//
//  FileOperator.h
//  CGNProject
//
//  Created by Michael Shen on 10/8/15.
//  Copyright (c) 2015 Dextrys. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface FileOperator : NSObject
+ (FileOperator *)defaultOperator;
- (void)setUserInfoObject:(NSObject *)object forKey:(NSString *)key;
- (id)userInfoObjectForKey:(NSString *)key;
- (BOOL)cacheObjectToFile:(NSObject *)object cacheInterval:(NSTimeInterval)interval forKey:(NSString *)key ;
- (NSObject *)getObjectFromCacheFileForKey:(NSString *)key complete:(void (^)(BOOL needUpdate,id result))complete ;
-(id)userInfo;
-(void)deleteUserInfo;

//use NSUserDefault
-(void)setDataDefaultObject:(NSObject *)object forKey:(NSString *)key;
-(id)dataDefaultObjectForKey:(NSString*)key;
-(void)removeDateDefaultObjectForKey:(NSString*)key;

@end
